import request from '@/utils/request'

//查询非活动内容列表
export function listActivities(data) {
  return request({
    url: '/ad/config/query',
    //url: '/dev-api/jjrjs/pmActivityOrderInfoController/checkRedPackage',
    method: 'post',
    data: data
  })
}

//添加非活动内容
export function addActivities(data) {
  return request({
    url: '/ad/config/saveItem',
    method: 'post',
    data: data
  })
}

//添加非活动内容
export function addItemActivities(data) {
  return request({
    url: '/ad/config/saveItem',
    method: 'post',
    data: data
  })
}

//删除主非活动内容
export function deleteActivities(adId) {
   return request({
     url: '/ad/config/deleteItem?subId='+adId,
     method: 'get'
   });
}

//查看item的详情
export function loadItem(id) {
  return request({
    url: `/ad/config/loadItem?adId=${id}`,
    method: 'get'
  });
}
